package com.hspedu.collection_;

import java.util.ArrayList;
import java.util.List;

/**
 * @author 谷其昊
 * @version 1.0
 * @date 2022/2/6
 * @time 19:32
 */
public class ArrayListSource {
    public static void main(String[] args) {
//        int[] arr = {1, 2, 3};
//
//        System.out.println(Arrays.toString(newArr));
//        int[] newArr;
//         newArr = Arrays.copyOf(arr, arr.length + 2);
//        System.out.println(Arrays.toString(newArr));

        List list = new ArrayList(1);
        for (int i = 0; i < 10; i++) {
            list.add(i);
        }

        for (int i = 10; i <15 ; i++) {
            list.add(i);
        }

        list.add(15);
    }
}
